<?php session_start();
include('includes/connexion.php');

$elevemanager = new EleveManager($connexion);
$collegemanager = new CollegeManager($connexion);
$classemanager = new ClasseManager($connexion);
?>
<!DOCTYPE html>
<head>
  <title>Imprimer liste des codes d'accès</title>
  <meta charset="utf-8">
  </head>
<body>
<?php
	echo '<table border="1px">';
	echo '<thead>';
	echo $collegemanager->get($classemanager->get($_GET['id'])->idRefCollege())->nom().' - '.$classemanager->get($_GET['id'])->nom();
	echo '</thead>';
	foreach($elevemanager->getByClasse($_GET['id']) as $key => $value){
		if($value->nom() == ""){
			echo '<tr border="0px"><td border="0px">';
			echo strtoupper($value->password());
			echo '</td></tr>';
		}
	}
	echo '</table>';
?>
<a href="javascript:close();">Fermer</a>
</body>
</html>